package com.ruoyi.web.controller.byw;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.BywTiktokUser;
import com.ruoyi.system.domain.vo.ExtenUserQuery;
import com.ruoyi.system.service.*;
import io.netty.util.concurrent.DefaultThreadFactory;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * 用户管理Controller
 *
 * @author ruoyi
 * @date 2024-05-25
 */
@Api(tags = {"用户管理"})
@RestController
@RequestMapping("/byw/exten-user")
public class BywUserMangerController extends BaseController {
    @Autowired
    private IBywTiktokUserService bywTiktokUserService;

    /**
     * 查询用户简历库列表
     */
    @ApiOperation("查询用户简历库列表")
    @PreAuthorize("@ss.hasPermi('byw:exten-user:list')")
    @GetMapping("/list")
    public TableDataInfo list(ExtenUserQuery extenUserQuery) {
        startPage();
        if (extenUserQuery.getStarTime() != null){
            extenUserQuery.setStarTime(DateUtils.getDayStartTime(extenUserQuery.getStarTime()));
        }
        if (extenUserQuery.getEndTime() != null){
            extenUserQuery.setEndTime(DateUtils.getDayEndTime(extenUserQuery.getEndTime()));
        }
        List<BywTiktokUser> list = bywTiktokUserService.selectTiktokMangerUserList(extenUserQuery);
        return getDataTable(list);
    }


}
